/**
 * 
 */
package cn.ad.server.web.servlet.v2.requesthandler;

import java.util.HashMap;
import java.util.Map;

/**
 * ServletRequestHandler 工厂类
 * @author Wu Chengjun
 */
public class ServletRequestHandlerFactory {

	private Map<String, ServletRequestHandler> servletRequestHandlers;
	
	/**
	 * 
	 */
	public ServletRequestHandlerFactory() {
		servletRequestHandlers = new HashMap<>();
	}
	
	/**
	 * 根据标识获取handler实例
	 * @param id
	 * @return
	 */
	public ServletRequestHandler getHandler(String id){
		return servletRequestHandlers.get(id);
	}

	/**
	 * @return the servletRequestHandlers
	 */
	public Map<String, ServletRequestHandler> getServletRequestHandlers() {
		return servletRequestHandlers;
	}

	/**
	 * @param servletRequestHandlers the servletRequestHandlers to set
	 */
	public void setServletRequestHandlers(Map<String, ServletRequestHandler> servletRequestHandlers) {
		this.servletRequestHandlers = servletRequestHandlers;
	}
	
	
}
